<?php

/**
 * Smarty Plugin to load a Template from a String
 * 
 * Usage:
 * 	$smarty->display("string:".$template);
 * 	{include file="string:`$string`"}
 * 
 * @author MS
 * @since 2008-11-14
 */
function smarty_resource_string_source($tpl_name, &$tpl_source, &$smarty){
	$tpl_source = $tpl_name;
	return true;
}

function smarty_resource_string_timestamp($tpl_name, &$tpl_timestamp, &$smarty){
	$tpl_timestamp = date("Y-m-d");
	return true;
}

function smarty_resource_string_secure($tpl_name, &$smarty){
	return true;
}

function smarty_resource_string_trusted($tpl_name, &$smarty){
	return null;
}


